{extend name="layout/layout" /}

{block name="pagecss"}
<link href="__STATIC__/plugins/bootstrap-switch/css/bootstrap-switch.min.css" rel="stylesheet" type="text/css" />
<link href="__STATIC__/admin/pages/css/popOn.css" rel="stylesheet" type="text/css" />
<link href="__STATIC__/admin/css/components.css" rel="stylesheet" type="text/css" />
{/block}

{block name="content"}
<div class="row">
    <div class="col-xs-12">
        <div class="box box-success">
            <div id="modal_new_role" class="form-horizontal form popSite">
                <form class="form-horizontal  margin-top-20" id="form_role_new" onsubmit="return submitFun(this);" method="post">
                    <div class="form-body">
                        <div class="form-group">
                            <label class="col-md-2 control-label">是否开启弹屏：</label>
                            <input type="hidden" name="id" value="{$row.id|default=''}">
                            <div class="col-md-6">
                                <div class="switch col-lg-4 " data-on="success" data-off="warning">
                                    <!-- class="bootstrap-switch-handle-off bootstrap-switch-default" -->
                                    <input name="status" type="hidden" id="status" value="{$row.status|default=''}">

                                    <input type="checkbox" id="switch" name="switch" {eq name="row.status" value="1"}checked{/eq}   class="bootstrap-switch-success" />
                                    <!-- bootstrap-switch-success -->
                                </div>
                            </div>
                        </div>
                        <div class="form-group pop_gg" >
                            <div class="relative">
                                <label class="col-md-2 control-label" style="line-height: 160px">　　展示广告：</label>
                                <div class="col-md-6 col-xs-7">
                                    <div id="btn-uploader" class="margin-bottom-15 relative pull-left">
                                        <a id="pickfiles" href="javascript:void 0;" style="position: relative; z-index: 1;"><img style="width: 160px;height: 160px" name="img_qiniu_url" src="{$row.imgUrl|default=''}" class="img-responsive"></a>
                                    </div>
                                    <div class="pull-left margin-left color9" style="margin-top: 50px">图片格式：png、jpg；<br />图片尺寸：600×800像素；<br />图片大小：不超过500K</div>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label">广告链接：</label>
                            <div class="col-md-6">
                                 <select name="linkType" class="form-control" value="">
                                    <option value="0" selected>无链接</option>
                                    <option value="7" {eq name="row.linkType" value="7"}selected{/eq} >文章</option>
                                    <option value="28"  {eq name="row.linkType" value="28"}selected{/eq}>文章列表</option>
                                    <option value="13" {eq name="row.linkType" value="13"}selected{/eq} >门店列表</option>
                                    <option value="21" {eq name="row.linkType" value="21"}selected{/eq} >分享返现</option>
                                    <option value="22" {eq name="row.linkType" value="22"}selected{/eq} >会员开通</option>
                                    <option value="24" {eq name="row.linkType" value="24"}selected{/eq} >我的订单</option>
                                    <option value="25" {eq name="row.linkType" value="25"}selected{/eq} >我的优惠券</option>
                                    <option value="26" {eq name="row.linkType" value="26"}selected{/eq} >我的拼团</option>
                                    <option value="27" {eq name="row.linkType" value="27"}selected{/eq} >账户余额</option>
                                </select>
                                <input type="hidden" class="site" id="linkId" name="linkId" value="{$row.linkId|default=''}">
                            </div>
                        </div>

                        <hr />
                        <div class="form-group">
                            <label class="col-md-3 control-label"></label>
                            <div class="col-md-9">
                                <button type="button" class="btn btn-primary btn_add_pop"><i class="fa fa-check"></i> 保存</button>
                                <span class="help-block "></span>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<!-- 弹框层-->
<div class="layer" >
    {include file="public/layer" /}
</div>
{/block}

{block name="pagescript"}
<script>
    var add_url = "{:url('admin/wxpop/save')}";
    var token_url = "{:url('admin/image/token')}";  //七牛图片token

    var layer_product = "{:url('admin/layer/product')}";  //商品弹出层数据接口
    var layer_productType = "{:url('admin/layer/productType')}";  //商品分类弹出层数据接口
    var layer_groups = "{:url('admin/layer/productType')}";  //拼团商品弹出层数据接口
    var layer_articles = "{:url('admin/layer/articles')}";  //文章列表弹出层数据接口
    var layer_points = "{:url('admin/layer/points')}";  //积分商品列表弹出层数据接口
    var layer_storeList = "{:url('admin/layer/storeList')}";  //门店列表弹出层数据接口
</script>
<script src="__STATIC__/admin/js/include.js" type="text/javascript"></script>
<script src="__STATIC__/admin/pages/js/appletLayer.js" type="text/javascript"></script>
<script src="__STATIC__/admin/pages/js/popOn.js" type="text/javascript"></script>
<script src="__STATIC__/plugins/bootstrap-switch/js/bootstrap-switch.min.js" type="text/javascript"></script>
{/block}